import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/vant.js'
import './assets/font/iconfont.css'
import axios from 'axios'
import './assets/css/global.css'
// 导入nprogress进度条js及css文件
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

// 设置请求拦截器
axios.interceptors.request.use(config => {
  NProgress.start()
  // 返回config
  return config
})
// 设置响应拦截器
axios.interceptors.response.use(config => {
  NProgress.done()
  return config
})

axios.defaults.baseURL = 'http://www.liulongbin.top:3005'
Vue.prototype.$http = axios
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
